﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OFB.BLL.Context;

namespace OFB.BLL.Repository
{
    public class ReportReportCourseBLL : IRepository<Domain.Course>
    {
        private ReportCourseContext context;

        public ReportReportCourseBLL()
        {
            context = new ReportCourseContext();
        }

        public ICollection<Domain.Course> FindAll()
        {
            //Gọi context Init(), truyền store procedure name là Report_GetAllCourses
            return context.Course.Init("Report_GetAllCourses")
                .MapCollection<Domain.Course>().GetCollection();
        }
    }
}
